<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div>一号</div>
    <div class="box">二号</div>
    <div class="box content">三号</div>
    <div class="box" id="container">四号</div>

    <script>
        // 根据 id
        // var ele = document.getElementById('container')
        // console.log(ele);
        // 根据类名
        // var ele = document.getElementsByClassName('ss')
        // console.log(ele);
        // 根据标签名
        // var ele = document.getElementsByTagName('div')
        // console.log(ele);
        // 根据选择器获取页面元素
        // var ele = document.querySelector('#box')
        // console.log(ele);
        // 根据选择器获取一组
        // var ele = document.querySelectorAll('p')
        // console.log(ele);

        /**操作文本内容*/
        


    </script>
    
</body>
</html>